package org.millioncall.yueyoga.admin.dao;

import java.util.Date;
import java.util.Map;

import org.millioncall.openplatform.common.PaginatedList;
import org.millioncall.yueyoga.admin.model.Consume;
import org.millioncall.yueyoga.admin.model.Consumption;

/**  
* @author lisj 
* Mar 15, 2014 10:54:12 AM 
*/
public interface ConsumptionDAO {
	
	/**添加消费**/
	public boolean saveConsumption(Map<String, Object> map);
	/**查询某个消费信息**/
	public Consumption findConsumptionById(Integer id);
	/**条件分页查询**/
	public PaginatedList<Consumption> findConsumptionsInPage(Map<String, Object> map,int start,int limit);
	
	public boolean saveConsume(Consume consume);
	
	/**
	 * 查看该会员是否已经消费过了
	 * @param map 参数集合
	 * @return true表示已来过，false表示没有
	 * */
	public boolean isConsumed(Map<String, Object> map);
	
	/**
	 * 通过会员编号和课程编号获取消费记录
	 * @param memberId
	 * @param resvId
	 * @param date
	 * @return
	 */
	public Consume findConsumptionByCdts(Integer memberId,Integer cheduleId,String date);
	
	public int deleteConsumeById(Integer consumeId);
}